/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controller;

import dataAccess.UsersJpaController;
import dataAccess.exceptions.NonexistentEntityException;
import entities.Users;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

/**
 *
 * @author QUY-THI
 */
public class EditUser {

    public boolean resultEdit(Users u) {
        try {
            EntityManagerFactory emf = Persistence.createEntityManagerFactory("E-AdministrationPU");
            UsersJpaController cl = new UsersJpaController(emf);
            cl.edit(u);
            return true;
        } catch (Exception ex) {
            return false;
        }
    }
}
